package com.lonty.intelligence.mapper;

import com.lonty.intelligence.model.Certificate;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;

/**
 * @Author 陈璇
 * @Date 2020/4/22 9:20
 * @Version 1.0
 */
@Mapper
public interface CertificateMapper {

    /**
     * 保存房产证
     * @param certificate
     * @return
     */
    int saveCertificate(Certificate certificate);

    /**
     * 根据住户ID获取房产信息
     * @param householdId
     * @return
     */
    List<Certificate> getCertificateByHouseholdId(String householdId);

    /**
     * 根据楼栋ID修改住房类型
     * @param buildingId
     * @param type
     * @return
     */
    int modifyCertificate(@Param("buildingId") String buildingId,@Param("type") Integer type);

    /**
     * 根据楼栋ID获取房产信息
     * @param buildingId
     * @return
     */
    Certificate getByBuildingId(String buildingId);

}
